//
//  UtilHelper.h
//  AsiaScene
//
//  Created by Rainbow on 3/17/11.
//  Copyright 2011 iTotemStudio. All rights reserved.
//

#include <ifaddrs.h>
#include <arpa/inet.h>
#import <mach/mach.h>
#import <mach/mach_host.h>
#import <Foundation/Foundation.h>
#import "CJSONDeserializer.h"
#import "CJSONSerializer.h"
#import "ASIFormDataRequest.h"

@interface UtilHelper : NSObject {
    
}

+ (NSString *)getUSDateByInterval:(NSTimeInterval)intervalTime;
+ (NSString *)getDateByInterval:(NSTimeInterval)intervalTime;
+ (NSString *)getDateByIntervalWithLine:(NSTimeInterval)intervalTime;
+ (NSString *)getZoneTimeByInterval:(NSTimeInterval)intervalTime;
+ (NSString *)getIntervalString:(NSTimeInterval)intervalTime;

+ (NSString *)getDateString:(NSTimeInterval)intervalTime withFormat:(NSString *)format;
+ (NSString *)convertDateStr:(NSString *)dateStr FromFormat:(NSString *)fromFormat toFormat:(NSString *)toFormat;
+ (NSTimeInterval )getTimeInterval:(NSString *)dateStr withFormat:(NSString *)format;

+ (NSString *)convertArrayToString:(NSArray *)array;
+ (NSArray *)convertStringToArray:(NSString *)string;
+ (NSString *)convertDictToJSON:(NSDictionary *)dict;
+ (NSDictionary *)convertJSONToDict:(NSString *)string;
+ (NSString *)getPathByFileName:(NSString *)fileName;
+ (NSString *)getPathByFileNameInBundle:(NSString *)fileName;
+ (BOOL)validateEmail:(NSString *)candidate;
+ (NSString *)encodeURL:(NSString *)url;
+ (NSString *)base64EncodingStringWithData:(NSData *)data lineLength:(unsigned int)lineLength;
+ (BOOL)validateCellPhone:(NSString *)candidate;
+ (UIImage *)getImageFromUrl:(NSString *)iamgeUrl;
+ (void)storeImageInDocument:(UIImage *)image ImageName:(NSString *)imageName;
+ (UIImage *)getImageFromDocument:(NSString *)imageName;
+ (void)deleteImageFromDocument:(NSString *)fileName;
+ (long)getDocumentSize:(NSString *)folderName;
+ (NSArray *)getLetters;
+ (NSArray *)getUpperLetters;
+ (CGFloat)getRGB:(NSInteger)value;
+ (NSString *)md5:(NSString *)str;
+ (NSString *)getIPAddress;
+ (NSString *)getFreeMemory;
+ (NSString *)getDiskUsed;
+ (CGFloat)getDistanceOfPoint1:(CGPoint)point1 Point2:(CGPoint)point2;
+ (NSInteger)getRandomStartNumber:(NSInteger)start EndNumber:(NSInteger)end; 
+ (NSString *)getStringValue:(id)value;
+ (void)showFadeInAnimation:(UIView*)view endAlpha:(CGFloat)alpha;

@end
